Introduction

A study on driving performance and In Vehicle infotainment system has been done. The study aims to answer two questions. 1) Can the addition of tactile navigation improve driving performance 2) Which tactile navigation (if any) improves driving performance most

The first part of this statistical analysis aims to investigate the sample to answer if the data is normally distributed and if the participants’s characteristics are distributed across the four conditions. If this is not the case an effect of condition could be attributed to other personal factors of the participants (e.g. gaming experience).

Dependent variables:
- SUS
- SART
- Total Crash
- Lane Breaks
- Total Glances
- Total Glance Time

Independent variable:
- Condition (Acrylic, Bar, Combination & Touch only)

Demographics:
- Age
- Gender
- Gaming
- Drivers licence Years
- Automatic gear experience
- Car Simulator

Population

A summary of ‘Age’ and ‘Years with drivers licence’. As with the bar graph for age we have a lot of people between 20-23 and most participants have had a drivers licence for 3-5 years.

Agessummary <- summary(dataFrame[c("Age")])

Drivingsummary <- summary(dataFrame[c("YearDriversLicence")])

Metricsummary <- summary(dataFrame[c("SART", "SUS", "TotalGlanceTime", "TotalGlances", "TotalCrash", "LaneBreaks")])

Agessummary
##       Age      
##  Min.   :20.0  
##  1st Qu.:21.0  
##  Median :22.0  
##  Mean   :22.7  
##  3rd Qu.:23.0  
##  Max.   :34.0
sd(dataFrame$Age)
## [1] 2.575191
Drivingsummary
##  YearDriversLicence
##  Min.   : 1.833    
##  1st Qu.: 3.417    
##  Median : 4.417    
##  Mean   : 4.756    
##  3rd Qu.: 5.417    
##  Max.   :16.000
sd(dataFrame$YearDriversLicence)
## [1] 2.426197

Effect due to condition

To answer the first question of whether condition have an effect on the 6 metrics we’ll create a plot of means with confidence (95%) as whiskers. According to Geoff Cumming and Sue Finch if the data has the same standard deviation it is possible to gain insight into which data could be significantly different.

Plot of means Condition/metric

plot1 <- plot1 + theme(legend.position = "none")
plot2 <- plot2 + theme(legend.position = "none")
plot3 <- plot3 + theme(legend.position = "none")
plot4 <- plot4 + theme(legend.position = "none")
plot5 <- plot5 + theme(legend.position = "none")
plot6 <- plot6 + theme(legend.position = "none")

Distribution of metrics (Bar and density)

  • SUS
  • SART
  • Total Crash
  • Lane Breaks
  • Total Glances
  • Total Glance Time

Bar Charts

SUSTotal <- ggplot(data = dataFrame, mapping = aes(x = SUS, fill = Condition))
SUSTotal <- SUSTotal + geom_bar(col = "black", size = .3) + scale_y_continuous(name = "Count", breaks = c(0:150)) + ggtitle("SUSTotal distribution") + scale_fill_brewer(palette = Palette)

SARTTotal <- ggplot(data = dataFrame, mapping = aes(x = SART, fill = Condition))
SARTTotal <- SARTTotal + geom_bar(col = "black", size = .3) + scale_y_continuous(name = "Count", breaks = c(0:150)) + ggtitle("SARTTotal distribution") + scale_fill_brewer(palette = Palette)

TotalCrashTotal <- ggplot(data = dataFrame, mapping = aes(x = TotalCrash, fill = Condition))
TotalCrashTotal <- TotalCrashTotal + geom_bar(col = "black", size = .3) + scale_y_continuous(name = "Count", breaks = c(0:150)) + ggtitle("TotalCrashTotal distribution") + scale_fill_brewer(palette = Palette)

LaneBreakTotal <- ggplot(data = dataFrame, mapping = aes(x = LaneBreaks, fill = Condition))
LaneBreakTotal <- LaneBreakTotal + geom_bar(col = "black", size = .3) + scale_y_continuous(name = "Count", breaks = c(0:150)) + ggtitle("LaneBreakTotal distribution") + scale_fill_brewer(palette = Palette)

GlancesTotal <- ggplot(data = dataFrame, mapping = aes(x = TotalGlances, fill = Condition))
GlancesTotal <- GlancesTotal + geom_bar(col = "black", size = .3) + scale_y_continuous(name = "Count", breaks = c(0:150)) + ggtitle("GlancesTotal distribution") + scale_fill_brewer(palette = Palette)

GlanceTimeTotal <- ggplot(data = dataFrame, mapping = aes(x = TotalGlanceTime, fill = Condition))
GlanceTimeTotal <- GlanceTimeTotal + geom_bar(col = "black", size = .3) + scale_y_continuous(name = "Count", breaks = c(0:150)) + ggtitle("SUGlanceTimeTotalSTotal distribution") + scale_fill_brewer(palette = Palette)

SUSTotal

SARTTotal

TotalCrashTotal

LaneBreakTotal

GlancesTotal

GlanceTimeTotal

Density

alpha <- 0.4
SUSDistribution <- ggplot(data = dataFrame, mapping = aes(x = SUS, fill = Condition, alpha = alpha))
SUSDistribution <- SUSDistribution + geom_density() + ggtitle("SUS distribution") + scale_fill_brewer(palette = Palette)

SUSDistribution <- ggplot(data = dataFrame, mapping = aes(x = SART, fill = Condition, alpha = alpha))
SUSDistribution <- SUSDistribution + geom_density() + ggtitle("SART distribution") + scale_fill_brewer(palette = Palette)

CrashDistribution <- ggplot(data = dataFrame, mapping = aes(x = TotalCrash, fill = Condition, alpha = alpha))
CrashDistribution <- CrashDistribution + geom_density() + ggtitle("Total Crash distribution") + scale_fill_brewer(palette = Palette)

LaneBreakDistribution <- ggplot(data = dataFrame, mapping = aes(x = LaneBreaks, fill = Condition, alpha = alpha))
LaneBreakDistribution <- LaneBreakDistribution + geom_density() + ggtitle("Lane Break distribution") + scale_fill_brewer(palette = Palette)

GlancesDistribution <- ggplot(data = dataFrame, mapping = aes(x = TotalGlances, fill = Condition, alpha = alpha))
GlancesDistribution <- GlancesDistribution + geom_density() + ggtitle("Glances distribution") + scale_fill_brewer(palette = Palette)

GlanceTimeDistribution <- ggplot(data = dataFrame, mapping = aes(x = TotalGlanceTime, fill = Condition, alpha = alpha))
GlanceTimeDistribution <- GlanceTimeDistribution + geom_density() + ggtitle("Total Glance Time distribution") + scale_fill_brewer(palette = Palette)

plot1<- SUSTotal
plot2<-SARTTotal
plot3<-TotalCrashTotal
plot4<-LaneBreakTotal
plot5<-GlancesTotal
plot6<-GlanceTimeTotal


GlancetimeAndGlanceCount <- ggplot(dataFrame, aes(x = TotalGlances, y = TotalGlanceTime, color = Condition)) +
    geom_point(size = 2, shape = 23) +
    geom_smooth(method = lm, se = FALSE)

Statistical analysis

Statistics will be run on all driving performance metrics grouped by conditions, to look for significant main effects. The normality and the variance will be analysed to ensure the correct statistical test is being used. Sharpiro Wilk test will be used to analyse the distribution of the residuals. Bartlett’s test will be used in case of normality to analyse the variance Levenes test will be used in case the residuals are not normal distributed to analyse the variance

Analysis of Glance Time grouped by conditions

The residuals proved to be normally distributed and the data has homogene variance which means a standard ANOVA test can be used

glanceTimeData <- subset(dataFrame, select = c("Participants", "Condition", "TotalGlanceTime"))
summary(glanceTimeData)
##   Participants       Condition  TotalGlanceTime
##  P1     : 1    Acrylic    :11   Min.   :21.06  
##  P10    : 1    Bar        :11   1st Qu.:28.71  
##  P11    : 1    Combination:11   Median :36.77  
##  P12    : 1    Touch_only :11   Mean   :36.93  
##  P13    : 1                     3rd Qu.:42.32  
##  P14    : 1                     Max.   :60.01  
##  (Other):38
get_summary_stats(glanceTimeData)
## # A tibble: 1 × 13
##   variable        n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>       <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 TotalGlanc…    44  21.1  60.0   36.8  28.7  42.3  13.6  11.1  36.9  9.88  1.49
## # ℹ 1 more variable: ci <dbl>
glanceTimeData %>%
    group_by(Condition) %>%
    identify_outliers(TotalGlanceTime)
## # A tibble: 3 × 5
##   Condition  Participants TotalGlanceTime is.outlier is.extreme
##   <fct>      <fct>                  <dbl> <lgl>      <lgl>     
## 1 Touch_only P3                      59.2 TRUE       FALSE     
## 2 Touch_only P4                      22.5 TRUE       FALSE     
## 3 Touch_only P9                      24.0 TRUE       FALSE
glanceTimeModel <- lm(TotalGlanceTime ~ Condition, data = glanceTimeData)
ggqqplot(residuals(glanceTimeModel))

shapiro_test(residuals(glanceTimeModel))
## # A tibble: 1 × 3
##   variable                   statistic p.value
##   <chr>                          <dbl>   <dbl>
## 1 residuals(glanceTimeModel)     0.970   0.302
# We use a bartlett test as the residuals are normally distributed
bartlett.test(TotalGlanceTime ~ Condition, data = glanceTimeData)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  TotalGlanceTime by Condition
## Bartlett's K-squared = 1.2274, df = 3, p-value = 0.7464
glanceTimeTest <- glanceTimeData %>% anova_test(TotalGlanceTime ~ Condition)
glanceTimeTest
## ANOVA Table (type II tests)
## 
##      Effect DFn DFd     F     p p<.05   ges
## 1 Condition   3  40 0.953 0.424       0.067

Analysis of Glance Count grouped by conditions

glanceCountData <- subset(dataFrame, select = c("Participants", "Condition", "TotalGlances"))
summary(glanceCountData)
##   Participants       Condition   TotalGlances  
##  P1     : 1    Acrylic    :11   Min.   :29.00  
##  P10    : 1    Bar        :11   1st Qu.:41.00  
##  P11    : 1    Combination:11   Median :48.50  
##  P12    : 1    Touch_only :11   Mean   :48.18  
##  P13    : 1                     3rd Qu.:54.25  
##  P14    : 1                     Max.   :80.00  
##  (Other):38
get_summary_stats(glanceCountData)
## # A tibble: 1 × 13
##   variable        n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>       <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 TotalGlanc…    44    29    80   48.5    41  54.2  13.2  11.1  48.2  10.7  1.62
## # ℹ 1 more variable: ci <dbl>
glanceCountData %>%
    group_by(Condition) %>%
    identify_outliers(TotalGlances)
## [1] Condition    Participants TotalGlances is.outlier   is.extreme  
## <0 rows> (or 0-length row.names)
glanceCountModel <- lm(TotalGlances ~ Condition, data = glanceCountData)
ggqqplot(residuals(glanceCountModel))

shapiro_test(residuals(glanceCountModel))
## # A tibble: 1 × 3
##   variable                    statistic p.value
##   <chr>                           <dbl>   <dbl>
## 1 residuals(glanceCountModel)     0.982   0.730
bartlett.test(TotalGlances ~ Condition, data = glanceCountData)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  TotalGlances by Condition
## Bartlett's K-squared = 8.0415, df = 3, p-value = 0.04516
glanceCountTest <- glanceCountData %>% welch_anova_test(TotalGlances ~ Condition)
glanceCountTest
## # A tibble: 1 × 7
##   .y.              n statistic   DFn   DFd     p method     
## * <chr>        <int>     <dbl> <dbl> <dbl> <dbl> <chr>      
## 1 TotalGlances    44      1.44     3  21.4  0.26 Welch ANOVA

Analysis of Crash Count grouped by condition

crashData <- subset(dataFrame, select = c("Participants", "Condition", "TotalCrash"))
summary(crashData)
##   Participants       Condition    TotalCrash 
##  P1     : 1    Acrylic    :11   Min.   :0.0  
##  P10    : 1    Bar        :11   1st Qu.:0.0  
##  P11    : 1    Combination:11   Median :0.0  
##  P12    : 1    Touch_only :11   Mean   :0.5  
##  P13    : 1                     3rd Qu.:1.0  
##  P14    : 1                     Max.   :3.0  
##  (Other):38
get_summary_stats(crashData)
## # A tibble: 1 × 13
##   variable       n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>      <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 TotalCrash    44     0     3      0     0     1     1     0   0.5 0.699 0.105
## # ℹ 1 more variable: ci <dbl>
crashData %>%
    group_by(Condition) %>%
    identify_outliers(TotalCrash)
## # A tibble: 1 × 5
##   Condition  Participants TotalCrash is.outlier is.extreme
##   <fct>      <fct>             <int> <lgl>      <lgl>     
## 1 Touch_only P17                   3 TRUE       FALSE
crashDataModel <- lm(TotalCrash ~ Condition, data = crashData)
ggqqplot(residuals(crashDataModel))

shapiro_test(residuals(crashDataModel))
## # A tibble: 1 × 3
##   variable                  statistic     p.value
##   <chr>                         <dbl>       <dbl>
## 1 residuals(crashDataModel)     0.740 0.000000182
crashData %>% levene_test(TotalCrash ~ Condition)
## # A tibble: 1 × 4
##     df1   df2 statistic     p
##   <int> <int>     <dbl> <dbl>
## 1     3    40    0.0580 0.981
crashDataTest <- crashData %>% kruskal_test(TotalCrash ~ Condition)
crashDataTest
## # A tibble: 1 × 6
##   .y.            n statistic    df     p method        
## * <chr>      <int>     <dbl> <int> <dbl> <chr>         
## 1 TotalCrash    44     0.203     3 0.977 Kruskal-Wallis

Crash Count visualization

Another way to present the crash data would be to score crashes pr condition: It can be seen on this graph that each condition has about the same total crashes and some conditions have one or two participants responsible for extra crashes.

Analysis of Lane Breaks grouped by condition

laneData <- subset(dataFrame, select = c("Participants", "Condition", "LaneBreaks"))
summary(laneData)
##   Participants       Condition    LaneBreaks    
##  P1     : 1    Acrylic    :11   Min.   : 0.000  
##  P10    : 1    Bar        :11   1st Qu.: 2.000  
##  P11    : 1    Combination:11   Median : 3.000  
##  P12    : 1    Touch_only :11   Mean   : 3.955  
##  P13    : 1                     3rd Qu.: 6.000  
##  P14    : 1                     Max.   :15.000  
##  (Other):38
get_summary_stats(laneData)
## # A tibble: 1 × 13
##   variable       n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>      <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 LaneBreaks    44     0    15      3     2     6     4  2.96  3.96  3.25  0.49
## # ℹ 1 more variable: ci <dbl>
laneData %>%
    group_by(Condition) %>%
    identify_outliers(LaneBreaks)
## # A tibble: 2 × 5
##   Condition Participants LaneBreaks is.outlier is.extreme
##   <fct>     <fct>             <int> <lgl>      <lgl>     
## 1 Acrylic   P28                  10 TRUE       FALSE     
## 2 Bar       P35                  15 TRUE       FALSE
laneDataModel <- lm(LaneBreaks ~ Condition, data = laneData)
ggqqplot(residuals(laneDataModel))

shapiro_test(residuals(laneDataModel))
## # A tibble: 1 × 3
##   variable                 statistic p.value
##   <chr>                        <dbl>   <dbl>
## 1 residuals(laneDataModel)     0.923 0.00582
laneData %>% levene_test(LaneBreaks ~ Condition)
## # A tibble: 1 × 4
##     df1   df2 statistic     p
##   <int> <int>     <dbl> <dbl>
## 1     3    40     0.461 0.711
laneDataTest <- laneData %>% kruskal_test(LaneBreaks ~ Condition)
laneDataTest
## # A tibble: 1 × 6
##   .y.            n statistic    df     p method        
## * <chr>      <int>     <dbl> <int> <dbl> <chr>         
## 1 LaneBreaks    44     0.234     3 0.972 Kruskal-Wallis

Analysis of SUS grouped by condition

susData <- subset(dataFrame, select = c("Participants", "Condition", "SUS"))
summary(susData)
##   Participants       Condition       SUS       
##  P1     : 1    Acrylic    :11   Min.   :47.50  
##  P10    : 1    Bar        :11   1st Qu.:73.75  
##  P11    : 1    Combination:11   Median :82.50  
##  P12    : 1    Touch_only :11   Mean   :79.26  
##  P13    : 1                     3rd Qu.:87.50  
##  P14    : 1                     Max.   :95.00  
##  (Other):38
get_summary_stats(susData)
## # A tibble: 1 × 13
##   variable     n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>    <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SUS         44  47.5    95   82.5  73.8  87.5  13.8  11.1  79.3  12.1  1.83
## # ℹ 1 more variable: ci <dbl>
susData %>%
    group_by(Condition) %>%
    identify_outliers(SUS)
## # A tibble: 2 × 5
##   Condition   Participants   SUS is.outlier is.extreme
##   <fct>       <fct>        <dbl> <lgl>      <lgl>     
## 1 Combination P15             65 TRUE       FALSE     
## 2 Combination P43             50 TRUE       TRUE
susDataModel <- lm(SUS ~ Condition, data = susData)
ggqqplot(residuals(susDataModel))

shapiro_test(residuals(susDataModel))
## # A tibble: 1 × 3
##   variable                statistic p.value
##   <chr>                       <dbl>   <dbl>
## 1 residuals(susDataModel)     0.901 0.00116
susData %>% levene_test(SUS ~ Condition)
## # A tibble: 1 × 4
##     df1   df2 statistic     p
##   <int> <int>     <dbl> <dbl>
## 1     3    40     0.214 0.886
susDataTest <- susData %>% kruskal_test(SUS ~ Condition)
susDataTest
## # A tibble: 1 × 6
##   .y.       n statistic    df     p method        
## * <chr> <int>     <dbl> <int> <dbl> <chr>         
## 1 SUS      44      1.97     3 0.578 Kruskal-Wallis

Analysis of SART grouped by condition

sartData <- subset(dataFrame, select = c("Participants", "Condition", "SART"))
sartData <- sartData[!(sartData$Participants == "P12" | sartData$Participants == "P13" | sartData$Participants == "P29" | sartData$Participants == "P30"), ]
summary(sartData)
##   Participants       Condition       SART      
##  P1     : 1    Acrylic    :10   Min.   : 4.00  
##  P10    : 1    Bar        :10   1st Qu.:12.00  
##  P11    : 1    Combination:10   Median :15.00  
##  P14    : 1    Touch_only :10   Mean   :14.32  
##  P15    : 1                     3rd Qu.:17.00  
##  P16    : 1                     Max.   :25.00  
##  (Other):34
get_summary_stats(sartData)
## # A tibble: 1 × 13
##   variable     n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>    <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 SART        40     4    25     15    12    17     5  4.45  14.3  4.34 0.686
## # ℹ 1 more variable: ci <dbl>
sartData %>%
    group_by(Condition) %>%
    identify_outliers(SART)
## # A tibble: 3 × 5
##   Condition   Participants  SART is.outlier is.extreme
##   <fct>       <fct>        <int> <lgl>      <lgl>     
## 1 Combination P7              20 TRUE       FALSE     
## 2 Combination P20             21 TRUE       FALSE     
## 3 Touch_only  P17              4 TRUE       FALSE
sartDataModel <- lm(SART ~ Condition, data = sartData)
ggqqplot(residuals(sartDataModel))

shapiro_test(residuals(sartDataModel))
## # A tibble: 1 × 3
##   variable                 statistic p.value
##   <chr>                        <dbl>   <dbl>
## 1 residuals(sartDataModel)     0.988   0.947
bartlett.test(SART ~ Condition, data = sartData)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  SART by Condition
## Bartlett's K-squared = 1.3196, df = 3, p-value = 0.7245
sartDataTest <- sartData %>% anova_test(SART ~ Condition)
sartDataTest
## ANOVA Table (type II tests)
## 
##      Effect DFn DFd     F    p p<.05   ges
## 1 Condition   3  36 0.133 0.94       0.011

Plots of Residuals

plot(residuals(glanceTimeModel))

plot(residuals(glanceCountModel))

plot(residuals(crashDataModel))

plot(residuals(laneDataModel))

plot(residuals(susDataModel))

plot(residuals(sartDataModel))

plot(glanceTimeData$Condition,residuals(glanceTimeModel))

plot(glanceCountData$Condition,residuals(glanceCountModel))

plot(crashData$Condition,residuals(crashDataModel))

plot(laneData$Condition,residuals(laneDataModel))

plot(susData$Condition,residuals(susDataModel))

plot(sartData$Condition,residuals(sartDataModel))

Analysis of use of aid grouped by condition

aidData <- subset(dataFrame, select = c("Participants", "Condition", "UseOfAid"))
aidData <- aidData[!(aidData$Condition == "Touch_only"), ]
summary(aidData)
##   Participants       Condition     UseOfAid     
##  P1     : 1    Acrylic    :11   Min.   :0.0000  
##  P11    : 1    Bar        :11   1st Qu.:0.0000  
##  P12    : 1    Combination:11   Median :0.0000  
##  P14    : 1    Touch_only : 0   Mean   :0.8182  
##  P15    : 1                     3rd Qu.:1.0000  
##  P19    : 1                     Max.   :4.0000  
##  (Other):27
get_summary_stats(aidData)
## # A tibble: 1 × 13
##   variable     n   min   max median    q1    q3   iqr   mad  mean    sd    se
##   <fct>    <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 UseOfAid    33     0     4      0     0     1     1     0 0.818  1.33 0.232
## # ℹ 1 more variable: ci <dbl>
aidPlotData <- subset(aidData, UseOfAid > 0)
aidPlot <- ggplot(data = aidPlotData, mapping = aes(x = Condition, y = UseOfAid, fill = Condition, label = UseOfAid))
aidPlot + geom_col(col = "black") +
    scale_y_continuous(name = "UseOfAid", breaks = c(0:15)) + ggtitle("Use of aid ") +
    geom_text(size = 6, position = position_stack(vjust = 0.5))

Plot of means - All Dependent variables vs All Independent variables

To investigate weather differences in demographics have had an influence on conditions a plot of means for each metric will be performed with each independent variable. This will be done with wiskers as 95% confidence interval and if the data has homoscedasticity it could be possible to eyeball significant influences. If these are detected we’ll perform a t-test

Dependent variables:
- SUS
- SART
- Total Crash
- Lane Breaks
- Total Glances
- Total Glance Time

Independent variables:
- Condition
- Gender
- Gaming
- Drivers licence (This plot will have a linear model underneath it (x=Years with drivers license y=Dependent variable)) - Automatic gear
- Car Simulator

SUS

SaveSixPlots(Metric = "SUS")
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]
## 
## Call:
## lm(formula = y ~ x, data = dataFrame)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -30.736  -5.481   3.101   9.028  16.407 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  81.8139     4.0829   20.04   <2e-16 ***
## x            -0.5367     0.7666   -0.70    0.488    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 12.2 on 42 degrees of freedom
## Multiple R-squared:  0.01154,    Adjusted R-squared:  -0.012 
## F-statistic: 0.4903 on 1 and 42 DF,  p-value: 0.4877
## 
## 
## [[6]]

## 
## [[7]]

Sart

SaveSixPlots("SART")
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]
## 
## Call:
## lm(formula = y ~ x, data = dataFrame)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -11.126  -2.709   0.331   2.755  10.092 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  15.7029     1.4170  11.082 4.78e-14 ***
## x            -0.2386     0.2660  -0.897    0.375    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.232 on 42 degrees of freedom
## Multiple R-squared:  0.01879,    Adjusted R-squared:  -0.004571 
## F-statistic: 0.8044 on 1 and 42 DF,  p-value: 0.3749
## 
## 
## [[6]]

## 
## [[7]]

### Total crash

SaveSixPlots("TotalCrash")
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]
## 
## Call:
## lm(formula = y ~ x, data = dataFrame)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6321 -0.4933 -0.4428  0.4963  2.5728 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept)  0.35204    0.23534   1.496    0.142
## x            0.03111    0.04419   0.704    0.485
## 
## Residual standard error: 0.703 on 42 degrees of freedom
## Multiple R-squared:  0.01167,    Adjusted R-squared:  -0.01186 
## F-statistic: 0.4958 on 1 and 42 DF,  p-value: 0.4852
## 
## 
## [[6]]

## 
## [[7]]

Lane Breaks

SaveSixPlots("LaneBreaks")
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]
## 
## Call:
## lm(formula = y ~ x, data = dataFrame)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.4578 -2.0947 -0.8649  1.9498 11.3722 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)   3.3907     1.0963   3.093  0.00352 **
## x             0.1186     0.2058   0.576  0.56764   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.275 on 42 degrees of freedom
## Multiple R-squared:  0.007839,   Adjusted R-squared:  -0.01578 
## F-statistic: 0.3319 on 1 and 42 DF,  p-value: 0.5676
## 
## 
## [[6]]

## 
## [[7]]

Total Glances

SaveSixPlots("TotalGlances")
## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]
## 
## Call:
## lm(formula = y ~ x, data = dataFrame)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -19.050  -7.358   0.167   6.005  31.550 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  49.1331     3.6376  13.507   <2e-16 ***
## x            -0.2000     0.6829  -0.293    0.771    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.87 on 42 degrees of freedom
## Multiple R-squared:  0.002038,   Adjusted R-squared:  -0.02172 
## F-statistic: 0.08578 on 1 and 42 DF,  p-value: 0.7711
## 
## 
## [[6]]

## 
## [[7]]

### Total Glance time

## [[1]]

## 
## [[2]]

## 
## [[3]]

## 
## [[4]]

## 
## [[5]]
## 
## Call:
## lm(formula = y ~ x, data = dataFrame)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -16.3769  -8.3684   0.1266   5.2345  21.8988 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  38.8529     3.3289  11.671 9.15e-15 ***
## x            -0.4046     0.6250  -0.647    0.521    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.944 on 42 degrees of freedom
## Multiple R-squared:  0.009878,   Adjusted R-squared:  -0.0137 
## F-statistic: 0.419 on 1 and 42 DF,  p-value: 0.5209
## 
## 
## [[6]]

## 
## [[7]]

From the many plot of means with confidence interval 95% as wisksers we’ve determined to test the following interactions

LaneBreaksAutomatic <- t.test(formula = LaneBreaks ~ Automatic, data = dataFrame)
SartGender <- t.test(formula = SART ~ Gender, data = dataFrame)
CrashComputer <- kruskal.test(formula = TotalCrash ~ ComputerGames, data = dataFrame)
CrashAutomatic <- t.test(formula = TotalCrash ~ Automatic, data = dataFrame)
GlanceTimeAutomatic <- t.test(formula = TotalGlanceTime ~ Automatic, data = dataFrame)
GlancesGender <- t.test(formula = TotalGlances ~ Gender, data = dataFrame)
GlancesAutomatic <- t.test(formula = TotalGlances ~ Automatic, data = dataFrame)

# MÃ¥ske er der noget med glances og condition

LaneBreaksAutomatic
## 
##  Welch Two Sample t-test
## 
## data:  LaneBreaks by Automatic
## t = 2.6531, df = 17.133, p-value = 0.01666
## alternative hypothesis: true difference in means between group No and group Yes is not equal to 0
## 95 percent confidence interval:
##  0.618242 5.406572
## sample estimates:
##  mean in group No mean in group Yes 
##          6.076923          3.064516
SartGender
## 
##  Welch Two Sample t-test
## 
## data:  SART by Gender
## t = -2.4169, df = 17.261, p-value = 0.02699
## alternative hypothesis: true difference in means between group F and group M is not equal to 0
## 95 percent confidence interval:
##  -5.9791715 -0.4090638
## sample estimates:
## mean in group F mean in group M 
##        12.10000        15.29412
CrashComputer
## 
##  Kruskal-Wallis rank sum test
## 
## data:  TotalCrash by ComputerGames
## Kruskal-Wallis chi-squared = 2.2623, df = 2, p-value = 0.3227
CrashAutomatic
## 
##  Welch Two Sample t-test
## 
## data:  TotalCrash by Automatic
## t = 1.7097, df = 14.508, p-value = 0.1086
## alternative hypothesis: true difference in means between group No and group Yes is not equal to 0
## 95 percent confidence interval:
##  -0.1230151  1.1056453
## sample estimates:
##  mean in group No mean in group Yes 
##         0.8461538         0.3548387
GlanceTimeAutomatic
## 
##  Welch Two Sample t-test
## 
## data:  TotalGlanceTime by Automatic
## t = 2.953, df = 23.453, p-value = 0.007043
## alternative hypothesis: true difference in means between group No and group Yes is not equal to 0
## 95 percent confidence interval:
##   2.626666 14.871746
## sample estimates:
##  mean in group No mean in group Yes 
##          43.09308          34.34387
GlancesGender
## 
##  Welch Two Sample t-test
## 
## data:  TotalGlances by Gender
## t = 1.8374, df = 24.153, p-value = 0.07848
## alternative hypothesis: true difference in means between group F and group M is not equal to 0
## 95 percent confidence interval:
##  -0.6707051 11.5883521
## sample estimates:
## mean in group F mean in group M 
##        52.40000        46.94118
GlancesAutomatic
## 
##  Welch Two Sample t-test
## 
## data:  TotalGlances by Automatic
## t = 1.8943, df = 20.358, p-value = 0.07249
## alternative hypothesis: true difference in means between group No and group Yes is not equal to 0
## 95 percent confidence interval:
##  -0.6836275 14.3610468
## sample estimates:
##  mean in group No mean in group Yes 
##          53.00000          46.16129

When analysing this much data the risk of p-hacking increases. We’ll only use these significanses if there is a big heteroscedasticity in regards to the four conditions maybe this change can explain

The three significant effects were:
1) LaneBreaks by Automatic 0.01666
2) TotalGlanceTime by Automatic 0.007043
3) SART by Gender 0.02699

We’ll see if these effects have been equally distributed across the four conditions:

AutomaticExperienceCondition

Automatic experience is distributed quite nice with a difference of 2 between highest and lowest. Therefore this effect is irrelevant.

GenderCondition

Gender is distributed with a difference of 1 between highest and lowest. Therefore this effect is irrelevant

To test significance we will use ANOVA
ANOVA has Three assumptions
1) Normality
2) Homogenity
3) Independence
The assumption of Independence is meet as our participants haven’t influence each other in any way we know of. The participants were instructed not to speak with each other between trials and we can hope they have met this instruction.

Analysis of glance duration per task

Another interesting aspect to look at is the distribution of glance duration across all tasks. This could potentially reveal patterns in certain tasks taking longer on average, indicating an imbalance in difficulty among the tasks

The glance durations are analysed with regards to guidelines found for IVIS designs - a single glance should be shorter than 1.5 seconds - the total time with eyes off the road should be less than 12 seconds for each task

percentTooLongGlances <- (sum(taskLongDataFrame$Single_Glance_duration >= 1.5) / sum(taskLongDataFrame$Single_Glance_duration > 0)) * 100
percentTooLongGlances
## [1] 5.09434
percentTooLongTasks <- (sum(taskShortDataFrame$Total_glance_duration_pr_task >= 12) / sum(taskShortDataFrame$Total_glance_duration_pr_task > 0)) * 100
percentTooLongTasks
## [1] 2.283105
singleGlanceBox <- ggplot(taskLongDataFrame, aes(x = Condition, y = Single_Glance_duration, fill = Condition)) +
    geom_boxplot() +
    scale_fill_brewer(palette = "Spectral")
singleGlanceBox

glanceTaskBox <- ggplot(taskShortDataFrame, aes(x = Task_nr, y = Total_glance_duration_pr_task, group = Task_nr, fill = factor(Task_nr))) +
    geom_boxplot() +
    scale_x_continuous(breaks = seq(0, 10, by = 1)) +
    scale_fill_brewer(palette = "Spectral")
glanceTaskBox